package com.jacen.fzxs.util;

import org.dom4j.Element;

import com.jacen.fzxs.entity.web.AppEntity;

public class AppEntityFormatUtil implements BaseDataFormatUtil<AppEntity> {

	private static AppEntityFormatUtil geposAppFormatUtil;

	private AppEntityFormatUtil() {

	}

	public static AppEntityFormatUtil getInstance() {
		if (geposAppFormatUtil != null) {
			return geposAppFormatUtil;
		}
		geposAppFormatUtil = new AppEntityFormatUtil();
		return geposAppFormatUtil;
	}

	@Override
	public Element formatData(AppEntity geposApp, Element parentElement) {
		Dom2EntityUtil.formatElement(geposApp, parentElement);
		return parentElement;
	}

	@Override
	public AppEntity parseData(Element dataElement) {
		AppEntity geposApp = new AppEntity();
		Dom2EntityUtil.parseElement(geposApp, dataElement);
		return geposApp;
	}
}
